home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / pango-1.0 / pango / pango-context.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  4.6 KB  |  107 lines

  1. /* Pango
  2.  * pango-context.h: Rendering contexts
  3.  *
  4.  * Copyright (C) 2000 Red Hat Software
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __PANGO_CONTEXT_H__
  23. #define __PANGO_CONTEXT_H__
  24.  
  25. #include <pango/pango-font.h>
  26. #include <pango/pango-fontmap.h>
  27. #include <pango/pango-attributes.h>
  28.  
  29. G_BEGIN_DECLS
  30.  
  31. /* Sort of like a GC - application set information about how
  32.  * to handle scripts
  33.  */
  34.  
  35. /* PangoContext typedefed in pango-fontmap.h */
  36. typedef struct _PangoContextClass PangoContextClass;
  37.  
  38. #define PANGO_TYPE_CONTEXT              (pango_context_get_type ())
  39. #define PANGO_CONTEXT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CONTEXT, PangoContext))
  40. #define PANGO_CONTEXT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CONTEXT, PangoContextClass))
  41. #define PANGO_IS_CONTEXT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CONTEXT))
  42. #define PANGO_IS_CONTEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CONTEXT))
  43. #define PANGO_CONTEXT_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CONTEXT, PangoContextClass))
  44.  
  45.  
  46. /* The PangoContext and PangoContextClass structs are private; if you
  47.  * need to create a subclass of these, mail otaylor@redhat.com
  48.  */
  49.  
  50. GType         pango_context_get_type      (void) G_GNUC_CONST;
  51.  
  52. #ifdef PANGO_ENABLE_BACKEND
  53. PangoContext *pango_context_new           (void);
  54. void          pango_context_set_font_map  (PangoContext                 *context,
  55.                        PangoFontMap                 *font_map);
  56. #endif /* PANGO_ENABLE_BACKEND */
  57. PangoFontMap *pango_context_get_font_map  (PangoContext                 *context);
  58.  
  59. void          pango_context_list_families (PangoContext                 *context,
  60.                        PangoFontFamily            ***families,
  61.                        int                          *n_families);
  62. PangoFont *   pango_context_load_font     (PangoContext                 *context,
  63.                        const PangoFontDescription   *desc);
  64. PangoFontset *pango_context_load_fontset  (PangoContext                 *context,
  65.                        const PangoFontDescription   *desc,
  66.                        PangoLanguage                *language);
  67.  
  68. PangoFontMetrics *pango_context_get_metrics   (PangoContext                 *context,
  69.                            const PangoFontDescription   *desc,
  70.                            PangoLanguage                *language);
  71.  
  72. void                      pango_context_set_font_description (PangoContext               *context,
  73.                                   const PangoFontDescription *desc);
  74. PangoFontDescription *    pango_context_get_font_description (PangoContext               *context);
  75. PangoLanguage            *pango_context_get_language         (PangoContext               *context);
  76. void                      pango_context_set_language         (PangoContext               *context,
  77.                                   PangoLanguage              *language);
  78. void                      pango_context_set_base_dir         (PangoContext               *context,
  79.                                   PangoDirection              direction);
  80. PangoDirection            pango_context_get_base_dir         (PangoContext               *context);
  81.  
  82. void                        pango_context_set_matrix (PangoContext      *context,
  83.                               const PangoMatrix *matrix);
  84. G_CONST_RETURN PangoMatrix *pango_context_get_matrix (PangoContext      *context);
  85.  
  86. /* Break a string of Unicode characters into segments with
  87.  * consistent shaping/language engine and bidrectional level.
  88.  * Returns a GList of PangoItem's
  89.  */
  90. GList *pango_itemize                (PangoContext      *context,
  91.                      const char        *text,
  92.                      int                start_index,
  93.                      int                length,
  94.                      PangoAttrList     *attrs,
  95.                      PangoAttrIterator *cached_iter);
  96. GList *pango_itemize_with_base_dir  (PangoContext      *context,
  97.                      PangoDirection     base_dir,
  98.                      const char        *text,
  99.                      int                start_index,
  100.                      int                length,
  101.                      PangoAttrList     *attrs,
  102.                      PangoAttrIterator *cached_iter);
  103.  
  104. G_END_DECLS
  105.  
  106. #endif /* __PANGO_CONTEXT_H__ */
  107.